package com.cares.event.listener;

import com.cares.business.procedure.service.ProcedureService;
import com.cares.event.dao.EventExecutionDao;
import com.cares.event.dao.EventProcessDao;
import com.cares.event.service.EventExecutionService;
import com.cares.event.service.EventProcessService;

/**
 * 获取srping中的bean
 * @author xuji
 *
 */
public class JsflowBeanFactory {
	
	//流程模板service
	public static EventExecutionDao getEventExecutionDao(){
		return (EventExecutionDao) cn.sh.cares.core.utils.spring.ApplicationContextHolder.getBean("eventExecutionDao");
	}
	
	//流程活动service
	public static EventProcessDao getEventProcessDao(){
		return (EventProcessDao) cn.sh.cares.core.utils.spring.ApplicationContextHolder.getBean("eventProcessDao");
	}
	
	//流程模板service
	public static EventProcessService getEventProcessService(){
		return (EventProcessService) cn.sh.cares.core.utils.spring.ApplicationContextHolder.getBean("eventProcessService");
	}
	
	//流程活动service
	public static EventExecutionService getEventExecutionService(){
		return (EventExecutionService) cn.sh.cares.core.utils.spring.ApplicationContextHolder.getBean("eventExecutionService");
	}
	
	//存储过程service
	public static ProcedureService getProcedureService(){
		return (ProcedureService) cn.sh.cares.core.utils.spring.ApplicationContextHolder.getBean("procedureService");
	}
	
	
}